<div class="fm-content">
  <!-- 最上面标题栏 -->
  <div class="title">
    <i nz-icon [type]="'desktop'"></i>
    &nbsp;&nbsp;登录日志
  </div>
  <!-- 内容 -->
  <div class="work">

    <!-- 查询框 -->
    <div class="top">
      <input nz-input placeholder="用户" class="fm-input first-input" [(ngModel)]="fs.queryObject['username:like']" />
      <input nz-input placeholder="状态" class="fm-input" [(ngModel)]="fs.queryObject['status:like']" />
      <nz-button-group>
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
      </nz-button-group>
    </div>

    <!-- 右则样表单主体 -->
    <div class="work-content">
      <div class="table">
        <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead>
            <tr>
              <th nzWidth="14%">用户</th>
              <th nzWidth="35%">信息</th>
              <th nzWidth="30%">时间</th>
              <th nzWidth="20%">状态</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td>
                {{data.username}}<br/>
                <span style="font-size: 12px;">({{data.userid}})</span>
              </td>
              <td>{{data.name}}<br/>{{data.url}}</td>
              <td>{{data.endTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
              <td>{{data.status}}</td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>
